package com.guigu.youxuan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.youxuan.mapper.GatherDetailsMapper;
import com.guigu.youxuan.pojo.Gather;
import com.guigu.youxuan.pojo.GatherDetails;
import com.guigu.youxuan.service.IGatherDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liweixin
 * @since 2024-05-15
 */
@Service
public class GatherDetailsServiceImpl extends ServiceImpl<GatherDetailsMapper, GatherDetails> implements IGatherDetailsService {

    @Autowired
    private GatherDetailsMapper gatherDetailsMapper;
    @Override
    public PageInfo<GatherDetails> InStoragePageList(int gatherId) {
//        QueryWrapper<GatherDetails> wrapper=new QueryWrapper<>();
//        System.out.println("gatherId = " + gatherId);
//        wrapper.eq("gather_id",gatherId);
        List<GatherDetails> goodsInfos=gatherDetailsMapper.list(gatherId);
        PageInfo<GatherDetails> pageInfo=new PageInfo<>(goodsInfos);
        return pageInfo;
    }
}
